package com.qfmy.webapp.controller.novel;

import com.qfmy.common.result.Result;
import com.qfmy.webapp.service.novel.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.qfmy.model.entity.novel
 * @date 2025/11/13
 * @description 书籍标签
 */

@RestController
@RequestMapping("/app/tag")
public class TagController {

    /**
     * 注入标签服务
     */
    @Autowired
    private TagService tagService;

    /**
     * 分页获取标签信息
     */
    @RequestMapping("/getTags")
    public Result<List<String>> getTags(@RequestParam Integer pageNum, @RequestParam Integer pageSize) {
        List<String> list = tagService.getTags(pageNum, pageSize);
        return Result.ok(list);
    }

}
